import Vue from 'vue'
import Vuex from 'vuex'
import user from '@/store/modules/user'
// 因为页面刷新后token就没有了,所以利用插件把token存储到本地
import VuexPersistence from 'vuex-persist'
Vue.use(Vuex)
const vuexLocal = new VuexPersistence({
  storage: window.localStorage
})
export default new Vuex.Store({
  modules: {
    user: user
  },
  plugins: [vuexLocal.plugin]

})
